package org.example.demo3.demos.web.vmsepsInformation.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.demo3.demos.web.entity.VmsEpsInformation;
import org.example.demo3.demos.web.mapper.VmsEpsInformationMapper;
import org.example.demo3.demos.web.vmsepsInformation.VmsEpsInformationService;
import org.springframework.stereotype.Service;

@Service
public class VmsEpsInformationServiceImpl extends ServiceImpl<VmsEpsInformationMapper,VmsEpsInformation>  implements VmsEpsInformationService   {

    @Override
    public VmsEpsInformation getInfoBySlv(String slv,String deptCode) {
        return getOne(new LambdaQueryWrapper<VmsEpsInformation>()
                .eq(VmsEpsInformation::getEpsCode, slv)
                .and(q -> {
                    q.eq(VmsEpsInformation::getApplication, "01")
                            .or().like(VmsEpsInformation::getJyjg, deptCode);
                }), false);
    }
}
